﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSIS.BLL.Base;
using PSIS.Common.Entity;
using PSIS.DAL.Sys;
using PSIS.Common.EntitySys;
using HNAT.CapitalRisk.Common;

namespace PSIS.BLL.System
{
    public class Product
    {
        public PSIResult InsertProduct(ProductEntity pProduct)
        {
            PSIResult result = new PSIResult();
            ProductDAO dao = new ProductDAO();
            int affectRow = dao.SaveProduct(pProduct);
            if (affectRow == 1)
            {
                result.IsSuccess = true;
            }
            else
            {
                result.IsSuccess = false;
                LoggerHelper.WriteInfo("Product.InsertProduct", "影响行数为:" + affectRow.ToString(), pProduct);
            }

            return result;
        }
    }
}
